import request from '../utils/request'
import qs from 'qs'

// 用户登录
export function userLogin (username, password, code, uuid) {
  const data = {
    username,
    password,
    bas64: code,
    id: uuid
  }
  return request({
    url: '/admin/users/login',
    method: 'POST',
    data: qs.stringify(data)
  })
}

export function getCodeImg () {
  return request({
    url: '/captcha/get',
    method: 'get'
  })
}

// 获取用户的详细信息
export function getInfo () {
  return request({
    url: '/system/index/getInfo',
    method: 'get'
  })
}

export function getRouters () {
  return request({
    url: '/system/index/getRouters',
    method: 'get'
  })
}
